import request from '@/utils/request'

// 查询用户组列表
export function pageList(data) {
  return request({
    url: '/os/group/list',
    method: 'post',
    data: data
  })
}

// 查询详细
export function getInfo(clientId) {
  return request({
    url: '/os/group/' + clientId,
    method: 'get'
  })
}

// 新增
export function add(data) {
  return request({
    url: '/os/group/add',
    method: 'post',
    data: data
  })
}

// 修改
export function update(data) {
  return request({
    url: '/os/group/edit',
    method: 'post',
    data: data
  })
}


// 删除
export function del(id) {
  return request({
    url: '/os/group/remove/' + id,
    method: 'delete'
  })
}


export function getUsersByUserGroupId(query) {
  return request({
    url: '/os/group/getUsersByUserGroupId',
    method: 'get',
    params: query
  })
}

export function getUnUsersByUserGroupId(query) {
  return request({
    url: '/os/group/getUnUsersByUserGroupId',
   method: 'get',
    params: query
  })
}

export function bindUsers(query) {
  return request({
    url: '/os/group/bindUsers',
   method: 'get',
    params: query
  })
}

export function bindClients(query) {
  return request({
    url: '/os/group/bindClients',
   method: 'get',
    params: query
  })
}



// 已绑定客户端
export function getClientsByUserGroupId(query) {
  return request({
    url: '/os/group/getClientsByUserGroupId',
  method: 'get',
    params: query
  })
}

// 未绑定客户端
export function getUnClientsByUserGroupId(query) {
  return request({
    url: '/os/group/getUnClientsByUserGroupId',
   method: 'get',
    params: query
  })
}




